Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE-1242] prevented weird exceptions related to integer handling #1244

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

2ps
Copy link
Contributor

@2ps 2ps commented Sep 9, 2023

if keys or values in the response json are ints, the k + ": " + v expression will fail because an int is not a str. In order to avoid this, we can either use %-formatting, .format formatting, or f-strings. I chose f-strings for usability, but regardless of which direction, the issue should be addressed one of those ways.

addresses #1242

@gonchik
Copy link
Member

gonchik commented Sep 10, 2023

@2ps could wrap via str() instead of f-strings.
Because it will break 2.7 compatibility

@gonchik
Copy link
Member

gonchik commented Sep 13, 2023

@2ps please use format in that situation please?

@2ps
Copy link
Contributor Author

2ps commented Sep 15, 2023

Apologies

@2ps please use format in that situation please?

Apologies for the late response, will do. That said, the setup.py file indicates that python2 isn't supported -- we may also want to update that to indicate support for python 2 and the eol'd python 2.7.

if keys or values in the response json are `int`s, the `k + ": " + v`
will fail because of an `int` is not a `str`.  In order to avoid this,
we can either use `%`-formatting, `.format` formatting, or f-strings.
We chose `.format` for compatability, but regardless of which direction, the
issue should be addressed one of those ways.
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.02% ⚠️

Comparison is base (176da86) 34.47% compared to head (b42b065) 34.45%.
Report is 2 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1244      +/-   ##
==========================================
- Coverage   34.47%   34.45%   -0.02%     
==========================================
  Files          44       44              
  Lines        8105     8108       +3     
  Branches     1118     1119       +1     
==========================================
  Hits         2794     2794              
- Misses       5197     5200       +3     
  Partials      114      114              
Files Changed Coverage Δ
atlassian/rest_client.py 67.97% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gonchik gonchik merged commit 480bc47 into atlassian-api:master Sep 16, 2023
8 checks passed
@gonchik
Copy link
Member

gonchik commented Sep 16, 2023

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants